﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;

public static class LookUp
{
    static DataTable renk = new DataTable();
    static DataTable desen = new DataTable();
    static DataTable anaKategori = new DataTable();
    static DataTable kategori = new DataTable();
    static DataTable cantaTuru = new DataTable();
    static DataTable deriCesidi = new DataTable();
    static DataTable kampanya = new DataTable();
    static DataTable kargo = new DataTable();

    public static DataTable Kargo
    {
        get { return LookUp.kargo; }
        set { LookUp.kargo = value; }
    }

    public static DataTable Kampanya
    {
        get { return LookUp.kampanya; }
        set { LookUp.kampanya = value; }
    }

    public static DataTable CantaTuru
    {
        get { return LookUp.cantaTuru; }
        set { LookUp.cantaTuru = value; }
    }

    public static DataTable DeriCesidi
    {
        get { return LookUp.deriCesidi; }
        set { LookUp.deriCesidi = value; }
    }
    
    public static DataTable Renk
    {
        get { return LookUp.renk; }
        set { LookUp.renk = value; }
    }

    public static DataTable Desen
    {
        get { return LookUp.desen; }
        set { LookUp.desen = value; }
    }

    public static DataTable AnaKategori
    {
        get { return LookUp.anaKategori; }
        set { LookUp.anaKategori = value; }
    }

    public static DataTable Kategori
    {
        get { return LookUp.kategori; }
        set { LookUp.kategori = value; }
    }

    public static DropDownList RenkDoldur(this DropDownList ddl)
    {
        ddl.DataSource = renk;
        ddl.DataTextField = "Renk";
        ddl.DataValueField = "RenkId";
        ddl.DataBind();
        return ddl;
    }

    public static DropDownList DesenDoldur(this DropDownList ddl)
    {
        ddl.DataSource = desen;
        ddl.DataTextField = "Desen";
        ddl.DataValueField = "DesenId";
        ddl.DataBind();
        return ddl;
    }

    public static DropDownList KategoriDoldur(this DropDownList ddl)
    {
        ddl.DataSource = kategori;
        ddl.DataTextField = "KategoriAdi";
        ddl.DataValueField = "KategoriId";
        ddl.DataBind();
        return ddl;
    }

    public static DropDownList AnaKategoriDoldur(this DropDownList ddl)
    {
        ddl.DataSource = anaKategori;
        ddl.DataTextField = "AnaKategoriAdi";
        ddl.DataValueField = "AnaKategoriId";
        ddl.DataBind();
        return ddl;
    }

    public static DropDownList CantaTuruDoldur(this DropDownList ddl)
    {
        ddl.DataSource = cantaTuru;
        ddl.DataTextField = "CantaTuruAdi";
        ddl.DataValueField = "CantaTuruId";
        ddl.DataBind();
        return ddl;
    }

    public static DropDownList DeriCesidiDoldur(this DropDownList ddl)
    {
        ddl.DataSource = deriCesidi;
        ddl.DataTextField = "DeriCesidiAdi";
        ddl.DataValueField = "DeriCesidiId";
        ddl.DataBind();
        return ddl;
    }

    public static DropDownList KampanyaDoldur(this DropDownList ddl)
    {
        ddl.DataSource = kampanya;
        ddl.DataTextField = "KampanyaAdi";
        ddl.DataValueField = "KampanyaId";
        ddl.DataBind();
        return ddl;
    }

    public static DropDownList KargoDoldur(this DropDownList ddl)
    {
        ddl.DataSource = kargo;
        ddl.DataTextField = "KargocuAdi";
        ddl.DataValueField = "KargocuId";
        ddl.DataBind();
        return ddl;
    }
}